JavaScript

A5.u.elementshown Method

Syntax

A5.u.element.shown(element)

Arguments

elementelementstring

A pointer to a DOM element or the ID of an element.

Description

Whether or not an element is shown.

Discussion

The A5.u.element.shown() method can be used to detect if an element is currently shown. If the element or any of its parents are not displayed, then the method will return "false". Otherwise the method will return "true".

Example

// assume "ele" is a pointer to an INPUT that wants to get focus
var shown = A5.u.element.shown(ele);
if(shown) ele.focus();